﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeCamp.BL.MemberProfile>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>
		Edit</h2>
	<% using (Html.BeginForm("Edit", "Speaker", FormMethod.Post, new { enctype = "multipart/form-data" }))
	{%>
	<fieldset>
		<legend>Fields</legend>
		<%= Html.HiddenFor(model => model.UserId) %>
		<div class="editor-label">
			<%= Html.LabelFor(model => model.FirstName) %>
		</div>
		<div class="editor-field">
			<%= Html.TextBoxFor(model => model.FirstName) %>
			<%= Html.ValidationMessageFor(model => model.FirstName) %>
		</div>
		<div class="editor-label">
			<%= Html.LabelFor(model => model.LastName) %>
		</div>
		<div class="editor-field">
			<%= Html.TextBoxFor(model => model.LastName) %>
			<%= Html.ValidationMessageFor(model => model.LastName) %>
		</div>
		<div class="editor-label">
			<%= Html.LabelFor(model => model.Bio) %>
		</div>
		<div class="editor-field">
			<%= Html.TextAreaFor(model => model.Bio,8,48,null) %>
			<%= Html.ValidationMessageFor(model => model.Bio) %>
		</div>
		<div class="editor-label">
			<%= Html.LabelFor(model => model.AllowAnonymizedContact) %>
		</div>
		<div class="editor-field">
			<%= Html.CheckBoxFor(model => model.AllowAnonymizedContact) %>
			<%= Html.ValidationMessageFor(model => model.AllowAnonymizedContact) %>
		</div>
		<div class="editor-label">
			<%= Html.LabelFor(model => model.AllowPublicProfile) %>
		</div>
		<div class="editor-field">
			<%= Html.CheckBoxFor(model => model.AllowPublicProfile)%>
			<%= Html.ValidationMessageFor(model => model.AllowPublicProfile) %>
		</div>
		<div class="editor-label">
			<%= Html.LabelFor(model => model.EmailOptIn) %>
		</div>
		<div class="editor-field">
			<%= Html.TextBoxFor(model=> model.EmailOptIn)%>
			<%= Html.ValidationMessageFor(model => model.EmailOptIn) %>
		</div>
		<div class="editor-label">
			<%= Html.LabelFor(model => model.Attachment) %>
		</div>
		<div class="editor-field">
			<input type="file" id="presenterImage" name="presenterImage" />
			<%= Model.Attachment.ShowImage("File", "Image") %>
		</div>
		<p>
			<input type="submit" value="Save" />
		</p>
	</fieldset>
	<% } %>
	<div>
		<%=Html.ActionLink("Cancel", "Index") %>
	</div>
</asp:Content>
